import 'package:beacon/beacon.dart';

// Flutter 调用原生代码
@HostApi()
abstract class PrimitiveHostApi {

  String getPlatformVersion(String str);

  String getUserInfo(Map<String, dynamic> dataMap);

  @async
  String getUserInfoAsync();

}

// 原生调用 Flutter
@FlutterApi()
abstract class PrimitiveFlutterApi {

  void sessionInvalid();

  void sendMessage1(String message);

  bool sendMessage2(String message);

}

// PlatformView API
@PlatformViewApi()
abstract class MyHostView {

  PlatformView kLineViewV1(Map<String, Object> dataMap);

  PlatformView kLineViewV2(String name, Map<String, Object>? dataMap);

  PlatformView kLineViewV3(String name, String? data);

}
